<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>登录页面</title>
</head>

<body>



  用户名：<input type="text" id="userName">
  <br>

  密码： <input type="text" id="password">
  <br>

  年龄: <input type="age" id="age">
  <br>

  性别: <input type="radio" name="sex" value="男生" id="sex1">男生</label>

  <input type="radio" name="sex" value="女生" id="sex2">女生</label>

  <br>
  <input type="submit" value="注册" id="submit">


  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>

  <script>
    var userName = document.getElementById("userName")
    var password = document.getElementById("password")
    var age = document.getElementById("age")
    var nan = document.getElementById("sex1")
    var nv = document.getElementById("sex2")
    var submit = document.getElementById("submit")
    submit.onclick = function () {

      $.ajax({
        type: 'post',
        url: "user/login",
        success: function (body) {
          userName = userName.value
          password = password.value
          age = age.value
          nan = nan.value
        }
      })
    }
  </script>





</body>

</html>